package com.sh.stream流;

import java.util.ArrayList;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class StreamDemo1 {
    public static void main(String[] args) {
        ArrayList<String> nameList = new ArrayList<>();
        nameList.add("张三");
        nameList.add("张无忌");
        nameList.add("李四");
        nameList.stream().filter(name->name.startsWith("张")).forEach(System.out::println);
    }
}

